package airport.server.pojo;

/**
 * Created by Romain on 13/02/15.
 */

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Time;
import java.util.Date;

@Entity
@Table(name = "PANNEAU")
public class Panneau implements Serializable {


    @ManyToOne
    @JoinColumn(
            name = "ID_HOTEL",
            referencedColumnName = "ID_HOTEL"
    )
    public Hotel hotel;

    @ManyToOne
    @JoinColumn(
            name = "ID_VOL",
            referencedColumnName = "ID_VOL"
    )
    public Vol vol;

    @Id
    @GeneratedValue
    @Column(name = "ID_PANNEAU")
    private Long idpanneau;

    @Column(name = "DATE_AFFICHAGE")
    private Date dateaff;

    @Column(name = "HEURE_AFFICHAGE")
    private Time heureaff;

    @Column(name = "image")
    private int image;

    public Panneau() {

    }

    public Panneau(Date da, Time ha) {
        dateaff = da;
        heureaff = ha;
    }


    public Long getIdpanneau() {
        return idpanneau;
    }

    public Vol getVol() {
        return vol;
    }

    public void setVol(Vol vol) {
        this.vol = vol;
    }

    public Hotel getHotel() {
        return hotel;
    }

    public void setHotel(Hotel hotel) {
        this.hotel = hotel;
    }

    public void setIdpanneau(Long idpanneau) {
        this.idpanneau = idpanneau;
    }

    public Date getDateaff() {
        return dateaff;
    }

    public void setDateaff(Date dateaff) {
        this.dateaff = dateaff;
    }

    public Time getHeureaff() {
        return heureaff;
    }

    public void setHeureaff(Time heureaff) {
        this.heureaff = heureaff;
    }

    public int getImage() {
        return image;
    }

    public void setImage(int image) {
        this.image = image;
    }
}
